let arr = [1 ,2, 4, 8, 9, 3, 5]

let newArr = arr.sort((a, b) => {
  return a - b
})

console.log(newArr)